﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Answers.Edit.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <!--#include virtual="include/Head.ascx"-->

    <script type="text/javascript" language="javascript">
        function doDelete(strID, strType) {
            if (confirm('B?n có th?c s? mu?n xóa')) {
                var vnpage = getUrlVars()['page_number'];
                if (vnpage)
                    window.location.href = "Answers.aspx?action=delete&ID=" + strID + "&page_number=" + vnpage;
                else
                    window.location.href = "Answers.aspx?action=delete&ID=" + strID;
            }
        }
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
       function ReloadOpener() {
            var pageno = getUrlVars()["page_number"];
            var ext = "";
            if (typeof pageno != "undefined") {
                ext = "&page_number=" + pageno;
            }
            window.opener.location.href = "Answers.aspx?" + ext;
            window.close();
        }
    </script>

    <style type="text/css"> 
        #main-content1 table td, #main-content1 table th, #main-content table td, #main-content table th {padding:0px;}
    </style>
</head>
<body>
    <div id="body-wrapper">
      <%--  <div id="header">
        </div>--%>
        <div id="main-content1">
            <div class="content-box">
                <form id="frmCarrContact" runat="server" autocomplete="off">
                    <%if (nPermissions >= 3)
                      {%>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">
                            Form Add [Edit]
                        </h3>
                        <div class="clear">
                        </div>
                    </div>
                    <table class="adminedit" style="width: 100%;">
                        <tr>
                            <td colspan="2">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <p style="font-weight:bold;padding:10px;">
                                    Đặt câu hỏi</p>
                                <CKEditor:CKEditorControl ID="txtSummary" runat="server" Toolbar="Bold|Italic|Underline|Strike|FontSize|TextColor|BGColor"
                                    Height="100px" Width="780px"></CKEditor:CKEditorControl>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <p style="font-weight:bold;padding:10px;">
                                    Trả lời câu hỏi</p>
                                <CKEditor:CKEditorControl ID="txtDescripton" runat="server" Toolbar="Bold|Italic|Underline|Strike|FontSize|TextColor|BGColor"
                                    Height="100px" Width="780px"></CKEditor:CKEditorControl>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="lblInfo" runat="server" CssClass="error"></asp:Label>
                            </td>
                        </tr>
                    </table>
                    <table class="paramlist admintable" width="100%">
                        <tr>
                            <td colspan="2">
                                <asp:Button class="button" ID="btnSave" runat="server" TabIndex="2" Text="Save" OnClick="btnSave_Click" />
                                <input type="button" id="Exit" value="Exit" class="button" onclick="ReloadOpener();" />
                            </td>
                        </tr>
                    </table>
                    <%} %>
                </form>
            </div>
        </div>
    </div>
    <%--  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>

    <script type="text/javascript">
        _uacct = "UA-2623402-1";
        urchinTracker();
    </script>
--%>
</body>
</html>
